<template>
  <div class="app-container">
    <div style="font-weight:bold;margin-bottom:15px">资产充值:</div>
    <div style="display: inline-block">
      <label class="radio-label" style="padding-left: 0">充值地址: </label>
      <el-input v-model="filename" placeholder="" style="width: 345px;margin-right:10px" />
      <label class="radio-label" style="padding-left: 0">充值币种: </label>
      <el-select
        v-model="value"
        style="margin-left: 10px; margin-right: 10px"
        placeholder="请选择"
      >
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>
      <label class="radio-label" style="padding-left: 0">充值数量: </label>
      <el-input v-model="filename" placeholder="" style="width: 345px" />
      <el-button type="primary" style="margin-left:10px" @click="recharge">确定</el-button>
    </div>
    <div style="font-weight:bold;margin-top:30px;">充值记录:</div>
    <div style="display: inline-block;margin-top:15px;margin-bottom:15px">
      <label class="radio-label" style="padding-left: 0">钱包地址: </label>
      <el-input
        v-model="filename"
        placeholder="钱包地址"
        style="width: 345px;margin-right:10px"
      />
      <label class="radio-label" style="padding-left: 0">币种: </label>
      <el-select
        v-model="value"
        style="margin-left: 10px; margin-right: 10px"
        placeholder="请选择"
      >
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>
      <el-button type="primary" @click="search">搜索</el-button>
    </div>
    <el-table
      :data="list"
      element-loading-text="Loading"
      border
      fit
      highlight-current-row
    >
      <el-table-column align="center" label="充值时间" width="300">
        <template slot-scope="scope">
          {{ scope.$index }}
        </template>
      </el-table-column>
      <el-table-column label="钱包名称" width="110" >
        <template slot-scope="scope">
          {{ scope.row.title }}
        </template>
      </el-table-column>
      <el-table-column label="钱包地址" align="center">
        <template slot-scope="scope">
          <span>{{ scope.row.author }}</span>
        </template>
      </el-table-column>
      <el-table-column label="币种" width="210" align="center">
        <template slot-scope="scope">
          {{ scope.row.pageviews }}
        </template>
      </el-table-column>
      <el-table-column label="数量" width="210" align="center">
        <template slot-scope="scope">
          {{ scope.row.pageviews }}
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { getList } from "@/api/table";

export default {
  filters: {
    statusFilter(status) {
      const statusMap = {
        published: "success",
        draft: "gray",
        deleted: "danger",
      };
      return statusMap[status];
    },
  },
  data() {
    return {
      list: null,
      options: [
        {
          value: "选项1",
          label: "黄金糕",
        },
        {
          value: "选项2",
          label: "双皮奶",
        },
        {
          value: "选项3",
          label: "蚵仔煎",
        },
        {
          value: "选项4",
          label: "龙须面",
        },
        {
          value: "选项5",
          label: "北京烤鸭",
        },
      ],
      value: "",
      // listLoading: true
    };
  },
  created() {
    this.fetchData();
  },
  methods: {
    fetchData() {
      // this.listLoading = true
      // getList().then(response => {
      //   this.list = null
      //   this.listLoading = false
      // })
    },
  },
};
</script>
